package com.example.exam.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @author shishuqian
 * date 2021/4/26
 * time 22:25
 * 描述：问题答案表
 **/
@Data
@Entity
@Table(name = "t_question_answer")
@ApiModel(value = "用户填写答案的对象")
public class QuestionAnswer implements Serializable {

    private static final long serialVersionUID = 983708086189222481L;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "试卷id",required = true,example = "14545")
    private Integer examPaperId;   //试卷的id

    //private Integer exam_paper_answer_id;  //提交试卷的id
    @ApiModelProperty(value = "问题id",required = true,example = "47481")
    private Integer questionId;     //问题id

    @ApiModelProperty(value = "填写人id",required = true,example = "763135")
    private Integer userId;     //问题填写人id

    @ApiModelProperty(value = "问题类型",required = true,example = "1")
    private String questionType;   //问题类型

    @ApiModelProperty(value = "问题原始分值",required = true,example = "50")
    private Double questionScore;  //题目原始分数

//    @ApiModelProperty(value = "用户得分",required = false,example = "30")
    private Double userScore;      //用户得分

    @ApiModelProperty(value = "用户填写的答案",required = true,example = "156")
    private String userAnswer;      //填写答案

//    @ApiModelProperty(value = "答案是否正确",required = false,example = "1")
    private Boolean doRight;           //是否正确


}
